<!DOCTYPE html>
<html>

<head lang="en">
    <title>找攻略</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/plugins/jquery/jquery.min.js"></script>
    <script src="/js/plugins/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <script src="/js/plugins/form/jquery.form.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/myStrategyComment.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/jquery-confirm/css/jquery-confirm.css">
    <script src="/js/plugins/jquery-confirm/js/jquery-confirm.js"></script>
    <script src="/js/common.js"></script>
    <script>
        $(function () {
            var params = getParams();
            $('#strategyCommentId').val(params.strategyCommentId);
            $('#commentReplyForm').ajaxForm(function (data) {
                if (data.success){
                    window.location.href='strategyComment.html?strategyCommentId='+params.strategyCommentId;
                }
            })
            var temp = '';
            $('#submitBtn').click(function () {
                var val = $('[name=content]').val();
                temp += '<p>'+val+'</p>'
                $('[name=content]').val(temp);
                $('#commentReplyForm').submit();
                $('[name=content]').val('');
            })

        })

    </script>
</head>

<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:window.history.go(-1)">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>

        </div>
        <div class="col">
            <span>评论</span>
        </div>
        <div class="col"></div>
    </div>
</div>
<form id="commentReplyForm" method="post" action="/commentReplies">
    <div class="comment">
        <hr/>


        <p>评价内容</p>
        <input id="strategyCommentId" type="hidden" name="strategyComment.id"/>
        <textarea name="content" class="form-control" rows="5" placeholder="请填写你对这条评论的评价"></textarea>
    </div>
</form>
</div>

</div>


<div class="operation">
    <button class="btn" onclick="window.history.go(-1)">放弃评价</button>
    <button class="btn" id="submitBtn">提交评价</button>
</div>


</body>


</html>